<?php

use yak\layui\widgets\form\ActiveForm;
use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $model yak\layui\models\admin\LoginForm */
/* @var $form yii\widgets\ActiveForm */
/* @var $ajaxOptions array */

$ajaxOptions = [
    'modelClass' => get_class($model),
];

?>

<div class="layui-card">
    <div class="layui-card-header">
        <i class="layui-icon layui-icon-engine"></i>&nbsp;&nbsp;用户登录
    </div>

    <?php $form = ActiveForm::begin([
        'options' => [
            'class' => 'layui-card-body layui-form layui-form-pane'
        ],
        'ajaxOptions' => $ajaxOptions
    ]); ?>


    <?= $form->field($model, 'username')->textInput([
        'maxlength' => true, 'lay-verify' => 'required'
    ]) ?>


    <?= $form->field($model, 'password')->textInput([
        'maxlength' => true
    ]) ?>

    <div class="layui-form-item">
        <?= Html::submitButton('登 录', [
            "class" => "layui-btn layui-btn-fluid", "lay-submit" => true, "lay-filter" => "_SUBMIT_FORM"
        ]) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>